<?php 
namespace app\api\validate;

use think\Validate;

class AddressAddValidate extends BaseValidate
{
    protected $rule = [
        'consignee'  =>  'require',
        'mobile'=>'require|mobile',
        'province'  =>  'require|integer',
        'city'  =>  'require|integer',
        'area'  =>  'require|integer',
        'address'  =>  'require',
        'isDefault'=>'require|in:0,1'
    ];   

    protected $message  =   [
        'consignee.require' => '收货人必须传递|300',
        'mobile.require'   => '手机号必须|301',
        'mobile.mobile'   => '手机号格式不正确|304',
        'province.require' => '地区省必须传递|300',
        'city.require' => '地区市必须传递|300',
        'area.require' => '地区区必须传递|300',
        'address.require' => '详细地址必须传递|300',
        'isDefault.require'=>'是否默认地址必须设置|305',
        'province.integer'=>'省的格式不正确|306',
        'city.integer'=>'城市的格式不正确|306',
        'area.integer'=>'地区的格式不正确|306', 
    ];

   
}


?>